import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { AuthService } from '../../../../providers/auth-service';
import { MyModifyPage } from '../modify/modify'
import { MyModifyPwdPage } from '../pwd/pwd'
import { MyChatPage } from '../chat/chat'



@Component({
  selector: 'page-my-root',
  templateUrl: 'root.html'
})

export class MyRootPage {
  currentUser:any
  constructor(public navCtrl: NavController, private auth: AuthService) {
    this.currentUser =  auth.getUserInfo()
  }
  public logout() {
    this.auth.logout()
  }
  public toChat() {
    this.navCtrl.push(MyChatPage)
  }
  public toModifyPwd() {
    this.navCtrl.push(MyModifyPwdPage)
  }
  public toModify() {
    this.navCtrl.push(MyModifyPage)
  }

}
